

QT       += core gui concurrent sql

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

# 获取 Qt 主版本号
QT_MAJOR_VERSION = $$split(QMAKE_VERSION, ".")[0]

# 如果是 Qt 5.x 使用 C++17
contains(QMAKE_VERSION, "5.") {
    CONFIG += c++17
    message("Using C++17 for Qt 5")
}

# 如果是 Qt 6.x 使用 C++20
contains(QMAKE_VERSION, "6.") {
    CONFIG += c++20
    message("Using C++20 for Qt 6")
}

# CONFIG += console

RC_ICONS = images/icon.ico

msvc{
    # CONFIG(release, debug|release){
    # QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\"
    # }
    DEFINES += COMPILE_MSVC
    # QMAKE_CXXFLAGS += /source-charset:utf-8 /execution-charset:utf-8
    QMAKE_CXXFLAGS += /utf-8
    QMAKE_CXXFLAGS_RELEASE += /O2 /GL /DNDEBUG
    QMAKE_LFLAGS_RELEASE += /LTCG
}


test

# RC_FILE = main.rc

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    appline.cpp \
    configfilereader.cpp \
    main.cpp \
    appmanager.cpp

HEADERS += \
    appline.h \
    appmanager.h \
    configfilereader.h \
    globalControl.h

FORMS += \
    appline.ui \
    appmanager.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

DISTFILES +=

LIBS += -luser32
LIBS += ole32.lib

RESOURCES += \
    images.qrc
